namespace ByteFarm.ImageMetaData.Format
{
    public abstract class DirectoryEntryFactory<TTag, TFieldType>
    {
        protected DirectoryEntryFactory(Reader reader)
        {
            Reader = reader;
        }

        public Reader Reader { get; protected set; }

        public DirectoryEntry<TTag, TFieldType> CreateDirectoryEntry()
        {
            return CreateDirectoryEntryInternal();
        }

        protected abstract DirectoryEntry<TTag, TFieldType> CreateDirectoryEntryInternal();
    }
}